home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8665 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.5 KB  |  43 lines

  1. Newsgroups: comp.lang.c
  2. Path: ncrgw2.ncr.com!ncrhub6!daynews!ranger!news
  3. From: Eric Laroche <elaroche@smtpadc.switzerland.attgis.com>
  4. Subject: Re: How to make this code portable?
  5. X-Nntp-Posting-Host: 135.135.180.223
  6. Content-Type: text/plain; charset=us-ascii
  7. Message-ID: <DnsvuG.66n@ranger.daytonoh.attgis.com>
  8. Sender: news@ranger.daytonoh.attgis.com (News Administrative Login)
  9. Content-Transfer-Encoding: 7bit
  10. Organization: AT&T Global Information Solutions
  11. References: <4h8k9j$78r@habs.ee.ubc.ca> <4hag3v$5or@nntp.ucs.ubc.ca>
  12. Mime-Version: 1.0
  13. Date: Tue, 5 Mar 1996 15:18:16 GMT
  14. X-Mailer: Mozilla 1.2N (Windows; I; 16bit)
  15.  
  16. Jennifer Gee <jgee@unixg.ubc.ca> wrote:
  17. >
  18. >>However, on the PC, "*.txt" is passed into my program as
  19. >>command line argument as is.  This means that I may have to
  20. >>put in extra operating system dependent logic to expand the wildcard
  21. >>inside my program.
  22. >
  23. >>Ellen Ho
  24. >>ellenh@ee.ubc.ca
  25. >
  26. >You will have to use conditional compilation if you want to make this 
  27. >portable, as you will have to write additional code(system("blah");) to 
  28. >handle this problem.  That is the comp.lang.c answer anyways.
  29.  
  30. It's not a good idea to include calls to system() to handle the filename 
  31. expansion.  Most compiler providers include functions to support that.
  32.  
  33. Some compilers may even provide support for this on the link level (by 
  34. explicitely linking an objext setargv.obj or the like), i.e. not even 
  35. conditional compiles are needed.
  36.  
  37. --Eric
  38.  
  39. ----
  40. Eric Laroche -- elaroche@smtpadc.switzerland.attgis.com, laroche@access.ch
  41.  
  42.  
  43.